package com.zbkj.crmeb.store.dao;

import java.math.BigDecimal;
import java.util.List;

import com.zbkj.crmeb.chant.request.PickingProductsRequest;
import com.zbkj.crmeb.chant.response.PickingProductResponse;
import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zbkj.crmeb.store.model.StoreProductAttrValue;
import com.zbkj.crmeb.store.request.StoreProductSearchRequest;
import com.zbkj.crmeb.store.response.StoreProductAttrValueResponse;

/**
 * <p>
 * 商品属性值表 Mapper 接口
 * </p>
 *
 * @author Mr.Zhang
 * @since 2020-05-27
 */
public interface StoreProductAttrValueDao extends BaseMapper<StoreProductAttrValue> {
    
    /**
     * 查询sku分页
     * @Description:  
     * @author daigb 
     * @param @param request
     * @param @return
     * @return List<StoreProductAttrValueResponse>
     * @throws
     */
    List<StoreProductAttrValueResponse> selectSkuPage(@Param("condition") StoreProductSearchRequest request);
    
    /**
     * 实时更新库存
     * @Description:  
     * @author daigb 
     * @param @param productId
     * @param @param stock
     * @param @return
     * @return Integer
     * @throws
     */
    Integer subProductStock(@Param("productId") Integer skuId,@Param("sourceSkuId")String sourceSkuId, @Param("stock") Integer stock);

    Integer subProductStockByJky(@Param("selfSourceSkuId")String selfSourceSkuId, @Param("stock") Integer stock);

    void updateValueSourceCost(List<Integer> productIdList);

    void updatePrice(List<Integer> productIdList, @Param("price")BigDecimal price);

    List<PickingProductResponse> selectPickingProduct(PickingProductsRequest request);

    List<PickingProductResponse> selectApplitPickingProduct(PickingProductsRequest request);

}
